import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
// import javax.microedition.media.*;
// import javax.microedition.media.control.*;

public class VinaSoftSNK1 extends MIDlet
{
	
	#include "defines.h"
	// #include "Touch.h"
	
	static VinaSoftSNK1 _theMIDlet = null;
	static private cGame mCanvas = null;
	static public Display s_display = null;
	// static Player player;
	// static Thread soundThread;
	
	public VinaSoftSNK1()
	{
		_theMIDlet = this;
		// cGame.midlet = this;
	}
	public void Exit()
	{
		destroyApp(true);
	}
	
	protected void startApp()
	{
#ifdef USE_DEBUG
		System.out.println("--->  startApp()");
#endif
		if (mCanvas == null)
		{
			mCanvas = new cGame();
			mCanvas.midlet = _theMIDlet;
			//mCanvas.setFullScreenMode(true);
			s_display = Display.getDisplay(this);
			s_display.setCurrent(mCanvas);
		}
		
	}

	protected void pauseApp()
	{
#ifdef USE_DEBUG
		System.out.println("--->  pauseApp()");
#endif
	}

	protected void destroyApp(boolean arg0)
	{
#ifdef USE_DEBUG
		System.out.println("~~~~~~~~~~ THOAT ~~~~~~~~~~~~~~~");
#endif
		this.notifyDestroyed();
	}
}
